package com.qingke.oo;

public class Player {
	private int number;
	private float x;
	private float y;
	private float z = 0;
	
	public Player(int number,float x,float y){
		this.number = number;
		this.x = x;
		this.y = y;
	}
	
	public void main(float xDisp,float yDisp){
		x = x + xDisp;
		y = y + yDisp;
	}
	
	public void jump(float zDisp){
		z = z + zDisp;
	}
	
	public boolean near(Balls ball){
		float i =(float) Math.sqrt(Math.pow(this.x-ball.getX(), 2)+Math.pow(this.y-ball.getY(), 2)+Math.pow(this.y-ball.getY(), 2));
		if(i<8)
			return true;
		return false;
	}
	
	public void kick(Balls ball){
		
	}
}
